<bookcatalog>
for $h in document("catalog.xml")/bookcatalog/section/book
return
  <book>
    { $h/@title,
      if ($h/@genre = "Computer")
      then $h/publisher
      else $h/author
    }
  </book>
</bookcatalog>